package cn.itsource.aigou.controller;

import cn.itsource.aigou.domain.Employee;
import cn.itsource.aigou.util.AjaxResult;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by Administrator on 2019/1/21 0021.
 */
@RestController
public class LoginController {


    @RequestMapping(value = "/login",method = RequestMethod.POST)
    public AjaxResult login(Employee employee){

        System.out.println(employee);

        if("admin".equals(employee.getName())&&"0".equals(employee.getPassword())){
            return AjaxResult.me();

        }else{
            return AjaxResult.me().setSuccess(false).setMessage("登陆失败");
        }

    }
}
